/**
 * 通用表格管理组件样式
 */

.table-manager {
  .search-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

    .el-form {
      .el-form-item {
        margin-bottom: 16px;
      }
    }
  }

  .table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;

    .table-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px;
      border-bottom: 1px solid #ebeef5;

      .table-title {
        font-size: 16px;
        font-weight: 600;
        color: #303133;
      }

      .table-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;

        .el-button {
          margin-left: 0;
        }
      }
    }

    .el-table {
      .el-table__header {
        th {
          background-color: #fafafa;
          color: #606266;
          font-weight: 600;
        }
      }

      .el-table__body {
        tr:hover {
          background-color: #f5f7fa;
        }
      }
    }

    .pagination {
      padding: 20px;
      text-align: right;
      border-top: 1px solid #ebeef5;
    }
  }

  // 响应式设计
  @media (max-width: 768px) {
    .search-form {
      padding: 16px;
    }

    .table-container {
      .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;

        .table-actions {
          width: 100%;
          justify-content: flex-start;
        }
      }

      .pagination {
        padding: 16px;
        text-align: center;
      }
    }
  }
}

// 表格操作按钮样式
.table-actions {
  .el-button {
    &.el-button--primary {
      background-color: #409eff;
      border-color: #409eff;
    }

    &.el-button--success {
      background-color: #67c23a;
      border-color: #67c23a;
    }

    &.el-button--warning {
      background-color: #e6a23c;
      border-color: #e6a23c;
    }

    &.el-button--danger {
      background-color: #f56c6c;
      border-color: #f56c6c;
    }
  }
}

// 状态标签样式
.status-tag {
  &.success {
    background-color: #f0f9ff;
    color: #67c23a;
    border-color: #b3e19d;
  }

  &.danger {
    background-color: #fef0f0;
    color: #f56c6c;
    border-color: #fbc4c4;
  }

  &.warning {
    background-color: #fdf6ec;
    color: #e6a23c;
    border-color: #f5dab1;
  }
}

// 表单对话框样式
.el-dialog {
  .el-dialog__header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #ebeef5;

    .el-dialog__title {
      font-size: 18px;
      font-weight: 600;
      color: #303133;
    }
  }

  .el-dialog__body {
    padding: 20px;
  }

  .el-dialog__footer {
    padding: 10px 20px 20px;
    text-align: right;
    border-top: 1px solid #ebeef5;
  }
}

// 搜索表单样式优化
.search-form {
  .el-form--inline {
    .el-form-item {
      margin-right: 16px;
      margin-bottom: 16px;
    }
  }

  .el-input {
    .el-input__inner {
      border-radius: 4px;
    }
  }

  .el-select {
    .el-input__inner {
      border-radius: 4px;
    }
  }
}

// 表格样式优化
.el-table {
  .el-table__header-wrapper {
    th {
      background-color: #fafafa;
      color: #606266;
      font-weight: 600;
      border-bottom: 1px solid #ebeef5;
    }
  }

  .el-table__body-wrapper {
    .el-table__row {
      &:hover {
        background-color: #f5f7fa;
      }

      td {
        border-bottom: 1px solid #ebeef5;
      }
    }
  }
}

// 分页样式优化
.pagination {
  .el-pagination {
    .el-pagination__total {
      color: #606266;
      font-weight: 400;
    }

    .el-pagination__sizes {
      .el-select {
        .el-input__inner {
          border-radius: 4px;
        }
      }
    }

    .el-pager {
      li {
        border-radius: 4px;
        margin: 0 2px;

        &.active {
          background-color: #409eff;
          color: #fff;
        }
      }
    }

    .btn-prev,
    .btn-next {
      border-radius: 4px;
    }
  }
}
